package com.tencent.wxcloudrun.util;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.RandomUtil;

import java.util.Date;

public class IdUtil {

    public static String generateId() {
        return RandomUtil.randomString("ACDEFGHIJKLMNOPQRSTUVWXYZ", 3) +
                DateUtil.format(new Date(), "yyyyMMddHHmmssSSSSSS");
    }

    public static String genShortId() {
        return RandomUtil.randomString("ACDEFGHIJKLMNOPQRSTUVWXYZ", 3) +
                DateUtil.format(new Date(), "HHmmssSSS");
    }

    public static String generateHouseId() {
        return RandomUtil.randomString("ACDEFGHIJKLMNOPQRSTUVWXYZ", 3) +
                DateUtil.format(new Date(), "MMddHHmmssSSS");
    }
}
